#!/usr/bin/env python
"""
# -*- coding: utf-8 -*-
# @Time    : 2020/9/20 14:32
# @Author  : AshJo
# @Desc    : 面向对象的命名空间
# @Filename: obj_namespace.py
# @Version : v1.0
"""


# 实现一个类，能够自动统计这个类实例化了多少个对象
class Person:
    obj_num = 0

    def __init__(self):
        Person.obj_num += 1
        print(Person.obj_num)

    def func(self):
        pass


a = Person()
b = Person()
c = Person()
# print(a.obj_num)
# print(b.obj_num)
# print(c.obj_num)
# print(Person.obj_num)
